using FireStarterModeller.BO;
using FireStarterModeller.Test.BO;
using FireStarterModeller.UI;
using Habanero.Faces.Win;
using NUnit.Framework;

namespace FireStarterModeller.Test.UI
{
    [TestFixture]
    public class TestDMPropertyAndRuleEditorControl
    {

//        [TestFixtureSetUp]
//        public void SetupFixture()
//        {
//            UITestUtils.SetupFixture();
//        }
//
//
//        [SetUp]
//        public virtual void SetupTest()
//        {
//            UITestUtils.SetupTest();
//
//        }
//
//        [Test]
//        public void TestSetBusinessObject()
//        {
//            //---------------Set up test pack-------------------
//            DMClass info = TestUtilsShared.CreateSavedDMClassWithProps();
//            DMPropertyAndRuleEditorControl control =
//                new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
//            //---------------Assert Precondition----------------
//
//            //---------------Execute Test ----------------------
//            control.Class = info;
//            //---------------Test Result -----------------------
//            Assert.AreSame(info, control.Class);
//            Assert.AreEqual(info.Properties.Count, control.Properties.Count);
//        }
//
//        [Test]
//        public void TestDisabledAtCreation()
//        {
//            //---------------Execute Test ----------------------
//            DMPropertyAndRuleEditorControl control =
//                new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
//            //---------------Test Result -----------------------
//
//            Assert.IsFalse(control.Enabled);
//        }
//
//        [Test]
//        public void TestSetEnables()
//        {
//            //---------------Set up test pack-------------------
//            DMClass info = TestUtilsShared.CreateSavedDMClassWithProps();
//            DMPropertyAndRuleEditorControl control =
//                new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
//      
//            //---------------Execute Test ----------------------
//            control.Class = info;
//            //---------------Test Result -----------------------
//            Assert.IsTrue(control.Enabled);
//            Assert.IsTrue(control.PropertyEditorControl.Enabled);
////            Assert.IsTrue(control.DMPropRuleControl.Enabled);
//        }
//
//        [Test]
//        public void TestSetToNullDisables()
//        {
//            //---------------Set up test pack-------------------
//            DMClass info = TestUtilsShared.CreateSavedDMClassWithProps();
//            DMPropertyAndRuleEditorControl control =
//                new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
//            control.Class = info;
//            //---------------Execute Test ----------------------
//            control.Class = null;
//            //---------------Test Result -----------------------
//            Assert.IsFalse(control.Enabled);  
//        }
//
//        [Test]
//        public void TestSetBusinessObjectPropertyInfo()
//        {
//            //---------------Set up test pack-------------------
//            DMClass bo = TestUtilsShared.CreateSavedDMClassWithProps();
//            TestUtilsShared.CreateSavedDMProperty(bo);
//
//            DMPropertyAndRuleEditorControl control = new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
//            control.Class = bo;
//            DMProperty info = bo.Properties[0];           
//            
//            //---------------Execute Test ----------------------
//            control.Property = info;
//            
//            //---------------Test Result -----------------------
//            Assert.AreSame(info, control.Property);
//        }
////
////        [Test]
////        public void TestLinkBetweenPropertyInfoAndPropRuleInfoControls()
////        {
////            //---------------Set up test pack-------------------
////            DMClass bo = TestUtilsShared.CreateSavedDMClassWithProps();
////            TestUtilsShared.CreateSavedDMProperty(bo);
////
////            DMPropertyAndRuleEditorControl control = new DMPropertyAndRuleEditorControl(new ControlFactoryWin());
////            control.Class = bo;
////
////            //---------------Execute Test ----------------------
////            control.Property = bo.Properties[0];
////            //---------------Test Result -----------------------
////            Assert.AreSame(control.Property, control.DMPropRuleControl.BusinessObject);
////            //---------------Tear Down -------------------------          
////        }


    }
}